package com.easy.dn.ui.usercenter.contract;

import com.easy.common.base.BaseModel;
import com.easy.common.base.BasePresenter;
import com.easy.common.base.BaseView;
import com.easy.dn.bean.CodeBean;
import com.easy.dn.bean.CodeVerificationBean;
import com.easy.dn.bean.UserInfoBean;

import java.util.Map;

import rx.Observable;

/**
 * Created by DN on 2017/5/3.
 */

public interface RegisterContract {
    //三个请求  注册 ，登录 ，获取是否开启图形验证码


    interface Model extends BaseModel {
        Observable<UserInfoBean> ObtainUserInfoData(Map<String, String> map);//登录

        Observable<CodeBean> ObtainCodeInfoData(Map<String, String> map);//是否开启图形验证码

        Observable<UserInfoBean> ObtainRegistgerData(Map<String, String> map);//注册

        Observable<CodeVerificationBean> ObtainVerificationData(Map<String, String> map);//验证身份
    }

    interface View extends BaseView {
        void returnUserInfoData(UserInfoBean bean);

        void returnCodeInfoData(CodeBean codeBean);//是否开启图形验证码

        void returnRegistgerData(UserInfoBean userInfoBean);//注册

        void returnCodeVerificationData(CodeVerificationBean codeVerificationBean);//验证身份
    }

    abstract static class Presenter extends BasePresenter<View, Model> {
        public abstract void getUserInfoData(Map<String, String> map);

        public abstract void getCodeInfoData(Map<String, String> map);//是否开启图形验证码

        public abstract void getRegistgerData(Map<String, String> map);//注册

        public abstract void getCodeVerificationData(Map<String, String> map);//验证身份
    }
}
